1. Field of the Invention
This invention relates generally to computer file systems. More specifically, this invention relates to a file system embedded in a storage device.
2. Description of the Related Art
Downloading copies of movies, music recordings, books, and other media via computer networks such as the Internet, is becoming increasingly popular. There are also an increasing number of different types and sizes of devices available to consumers for accessing the downloaded information. One concern, however, is protecting both downloaded and pre-recorded media from unauthorized access, copying, and distribution.
Most prior art storage devices, including hard drives, floppy drives, write once read many (WORM) drives, such as CD-ROM and DVD drives, are classified as block level devices. Prior art devices for accessing media in digital formats as shown for example in FIG. 1, typically include host system 100 coupled to one or more data storage devices 102, 104, 106 containing storage media. In the prior art, host system 100 includes file system manager 108 and host device drivers 110, 112, 114 which translate file commands from user application program 116 to commands recognized by device drivers 118, 120, 122 for storage devices 102, 104, 106. Application programs include any software or firmware in host system 100 that request access to storage devices 102, 104, 106.
Host system 100 reads and writes to storage devices 102, 104, 106 on block boundaries. Traditionally, the knowledge of the file system format is placed in block input/output (I/O) driver 124 in host system 100, and storage devices 102, 104, 106 have no knowledge of the file system format that is used on the storage media (not shown).
Thus prior art storage devices 102, 104, 106 are relatively xe2x80x9cdumbxe2x80x9d, in that they simply read or write the blocks requested by host system 100. In some cases, storage device drivers 118, 120, 122 include caching algorithms that try to predict what host system 100 will request next and pre-read that information. These algorithms, in general, do not have the benefit of knowing the file structure on the media, and therefore, often fail to optimize correctly, especially in cases where files are fragmented on the media.
Host block I/O driver 124 for block file systems is quite complicated as it must understand the type of storage device it is communicating with, and a different device driver 118, 120, 122 for each different type of storage device 102, 104, 106. Some storage devices, such as hard drives, have been standardized to the point where a single driver will work on multiple types of hard drives. Other devices, particularly specialty devices such as flash memory cards, generally require a different driver that understands the underpinnings of that device. These drivers can become very complicated, thereby making it difficult to port the drivers to different platforms. The cost of developing drivers for specialty devices is very high. Each driver must be able to perform all the commands (read file, write file, create directory, etc.) that are requested from the application. Because each driver must implement a complete set of commands, significant resources are used to manage many different devices.
Further, each time a storage device changes, device drivers 110, 112, 114 on host system 100 must be aware of the change. For example, the CD-R device drivers are significantly different than the CDROM device drivers that preceded them. This is because the underlying technology of the storage device changed, thus requiring host system 100 device drivers to track those changes.
Devices used by consumers for playing music and movies range from home theatre systems to highly portable palmtop devices. Accordingly, there is a need to provide a storage device and storage medium that is compact and portable, yet capable of storing and transmitting large amounts of data for real-time playback. The storage device must also interface with a wide variety of hosts such as personal computer systems, televisions, audio systems, and portable music players. Further, it is important for the storage device to protect content on the storage medium using a digital rights management scheme.
A file system for accessing information on digital storage media in a storage device is included in a storage device controller in the storage device. The storage device controller includes an interface component to receive a packet having a file system command. A command decode component in the storage device controller decodes the file system command, and an interface response structure component creates a strategy for performing the file system command. The storage device controller generates an identifier for a file system object and accesses the file system object using the file system object""s identifier. A host system coupled to the storage device receives a storage device access request from an application program and generates a command to perform on the file system object based on the storage device access request. The host system uses the identifier to indicate the file system object to be accessed.
In one feature of the present invention, the file system manager correlates the identifier to pathnames used in application programs for the file system object. One advantage of this feature is that only the identifier is required for the host system to access an entire file system object.
Another feature of the file system includes library functions to create and remove file system objects, to store and retrieve information, to set and retrieve attributes of the file system object, to retrieve file system statistics, to retrieve identifiers, and to set and retrieve a type identifier for the file system object. The type identifier indicates the format of the content within a file.
Embodiments of the present invention may be used with a variety of storage devices including magnetic and optical storage systems. Security features are included within the storage device to prevent unauthorized access to file system objects. One advantage of this implementation is that security information is not stored on the host device, and is therefore not accessible to users.
Other features of the present file system include means to lock and unlock the storage media in the storage device, and provide indications to the host system when storage media is inserted in the storage device.
Advantageously, the present file system is compatible with a variety of different host devices because all accesses to storage devices are at a file and directory level using the identifier. The host system does not need to have knowledge of the type of storage device with which it is communicating. Therefore, the file system manager and translator are easily ported to different host systems.
Another advantage of present file system is that it facilitates read-ahead caching because the storage device knows the structure of the file and does not have to wait for block information from the host system.
Another advantage of file system over block devices is that the format of the storage media may change without requiring any change to the file system manager or translator.
The foregoing has outlined rather broadly the objects, features, and technical advantages of the present invention so that the detailed description of the invention that follows may be better understood.